﻿using System;
using System.Data;
using WP.Commons;

namespace WP.RM.DataEntity
{

    //=========MCity  ============================
    [System.ComponentModel.DesignerCategory("Code")]
    public class RMWorkerDEL : DataSet, IDataEntity
    {
        //=========mCity ============================
        public const string TABLENAME_rmWorker = "rmWorker";
        public const string RecID="RecID";
      public const string WorkerID="WorkerID";
      public const string WorkerName="WorkerName";
      public const string NamePY="NamePY";
      public const string WorkPositionSeqNo="WorkPositionSeqNo";
      public const string WorkPositionName = "WorkPositionName";
      public const string WorkingProcedureID="WorkingProcedureID";
      public const string WorkingProcedureName = "WorkingProcedureName";
      public const string BeginDate="BeginDate";
      public const string STDSalary="STDSalary";
      public const string PrdSalary="PrdSalary";
      public const string DftWorkDays="DftWorkDays";
      public const string SalaryRate="SalaryRate";
      public const string STDWorkSalary="STDWorkSalary";
      public const string InsuranceRate="InsuranceRate";

      public const string EndowmentIns = "EndowmentIns";
      public const string EndowmentInsRate = "EndowmentInsRate";
      public const string MedicalIns = "MedicalIns";
      public const string MedicalInsRate = "MedicalInsRate";
      public const string UnEmployIns = "UnEmployIns";
      public const string UnEmployInsRate = "UnEmployInsRate";

      public const string ISDel = "IsDEL";
      public const string Remark = "Remark";

      public const string WorkShopSeqNo = "WorkShopSeqNo";
      public const string WorkShopName = "WorkShopName";
      public const string MachineSeqNo="MachineSeqNo";
      public const string MachineName = "MachineName";
      public const string RecStamp = "RecStamp";
        private System.Collections.Specialized.NameValueCollection mVarCollection = new System.Collections.Specialized.NameValueCollection();
        public System.Collections.Specialized.NameValueCollection VarCollection
        {
            get { return mVarCollection; }
            set { mVarCollection = value; }
        }

        public RMWorkerDEL()
        {
            //Create mCity structure
            CreatemCityStructure();

        }

        //=========mCity============================
        private void CreatemCityStructure()
        {
            DataTable table;
            DataColumnCollection DCC;
            DataColumn DC = new DataColumn();
            table = new DataTable(TABLENAME_rmWorker );
            DCC = table.Columns;

            DC = new DataColumn(RecID, typeof(System.Int32));
            DCC.Add(DC);

            DC = new DataColumn(WorkerID, typeof(System.String));
            DC.DefaultValue = "";
            DCC.Add(DC);

            DC = new DataColumn(WorkerName, typeof(System.String));
            DC.DefaultValue = "";
            DCC.Add(DC);

            DC = new DataColumn(NamePY, typeof(System.String));
            DC.DefaultValue = "";
            DCC.Add(DC);

            DC = new DataColumn(WorkPositionSeqNo, typeof(System.String));
            DC.DefaultValue = "";
            DCC.Add(DC);
            
            DC = new DataColumn(WorkingProcedureID, typeof(System.String));
            DC.DefaultValue = "";
            DCC.Add(DC);

            DC = new DataColumn(WorkingProcedureName, typeof(System.String));
            DC.DefaultValue = "";
            DCC.Add(DC);

            DC = new DataColumn(Remark, typeof(System.String));
            DC.DefaultValue = "";
            DCC.Add(DC);

            DC = new DataColumn(MachineSeqNo, typeof(System.String));
            DC.DefaultValue = "";
            DCC.Add(DC);
            DC = new DataColumn(MachineName, typeof(System.String));
            DC.DefaultValue = "";
            DCC.Add(DC);

            DC = new DataColumn(WorkPositionName, typeof(System.String));
            DC.DefaultValue = "";
            DCC.Add(DC);

            DC = new DataColumn(WorkShopSeqNo, typeof(System.String));
            DC.DefaultValue = "";
            DCC.Add(DC);

            DC = new DataColumn(WorkShopName , typeof(System.String));
            DC.DefaultValue = "";
            DCC.Add(DC);

            DC = new DataColumn(BeginDate, typeof(System.DateTime ));
            DCC.Add(DC);

            DC = new DataColumn(STDSalary, typeof(System.Double));
            DC.DefaultValue = 0;
            DCC.Add(DC);

            DC = new DataColumn(STDWorkSalary, typeof(System.Double));
            DC.DefaultValue = 0;
            DCC.Add(DC);

            DC = new DataColumn(InsuranceRate, typeof(System.Double));
            DC.DefaultValue = 0;
            DCC.Add(DC);

            DC = new DataColumn(MedicalIns , typeof(System.Double));
            DC.DefaultValue = 0;
            DCC.Add(DC);
            DC = new DataColumn(MedicalInsRate, typeof(System.Double));
            DC.DefaultValue = 0;
            DCC.Add(DC);
            DC = new DataColumn(UnEmployIns, typeof(System.Double));
            DC.DefaultValue = 0;
            DCC.Add(DC);
            DC = new DataColumn(UnEmployInsRate, typeof(System.Double));
            DC.DefaultValue = 0;
            DCC.Add(DC);
            DC = new DataColumn(EndowmentIns, typeof(System.Double));
            DC.DefaultValue = 0;
            DCC.Add(DC);
            DC = new DataColumn(EndowmentInsRate, typeof(System.Double));
            DC.DefaultValue = 0;
            DCC.Add(DC);

            DC = new DataColumn(PrdSalary, typeof(System.Double));
            DC.DefaultValue = 0;
            DCC.Add(DC);

            DC = new DataColumn(DftWorkDays, typeof(System.Double ));
            DC.DefaultValue = 0;
            DCC.Add(DC);

            DC = new DataColumn(SalaryRate, typeof(System.Double ));
            DC.DefaultValue = 0;
            DCC.Add(DC);

            DC = new DataColumn(ISDel, typeof(System.Boolean));
            DC.DefaultValue = false;
            DCC.Add(DC);

            DC = new DataColumn(RecStamp , typeof(System.Byte[]));
            DCC.Add(DC);


            this.Tables.Add(table);
        }
    }
}
